/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cq.bd.service.impl;

import java.util.List;
import java.util.Map;

import com.cq.base.domain.Page;
import com.cq.bd.dao.STakeLocationDao;
import com.cq.bd.domain.STakeLocation;
import com.cq.bd.service.TakeLocationService;

/**
 * 采血地点管理
 * 
 * @author huangmy
 * @date   2009-10-5
 */
public class TakeLocationServiceImpl implements TakeLocationService {
    private STakeLocationDao sTakeLocationDao;
    
    public void doCreateTakeLocation(STakeLocation takeLocal) {
        this.sTakeLocationDao.create(takeLocal);
    }

    public List<STakeLocation> doGetTakeLocations() {        
        return this.sTakeLocationDao.list();
    }
    
    public STakeLocation doGetTakeLocation(Long locationId) {
        return this.sTakeLocationDao.get(locationId);
    }
    
    public void doDeleteTakeLocation(Long locationId) {
        STakeLocation t = this.sTakeLocationDao.get(locationId);
        if (t != null) {
            this.sTakeLocationDao.remove(t);
        }
    }
    
    public Page pageTakeLocations(Map<String, String> filter, Map<String, String> like, Map<String, String> sort,
            int pageNo, int pageSize) {
        return this.sTakeLocationDao.pagedQuery(filter, like, sort, pageNo, pageSize);
    }

    public void doUpdateTakeLocation(STakeLocation takeLocal) {
        this.sTakeLocationDao.update(takeLocal);
    }

    public void setSTakeLocationDao(STakeLocationDao takeLocationDao) {
        sTakeLocationDao = takeLocationDao;
    }

}
